package com.zryc.shop.feign;

import com.zryc.shop.base.Result;
import com.zryc.shop.pms.entity.Product;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


@FeignClient(name = "shop-product")//name是微服务在nacos上的注册名
public interface IFeignProduct {

    @GetMapping("/pms/product/detail/{id}")
    Product detail(@PathVariable Long id);

    @GetMapping("/pms/product/{id}/{count}")
    Result recieve(@PathVariable("id") Long productId, @PathVariable("count") Integer productCount);

    @GetMapping("/pms/product/skus/{id}/{count}")
    Result skuStock(@PathVariable("id") Long productId, @PathVariable("count") Integer productCount);
}